package Level_two;

public class One {
    public static void main(String[] args) {
        //获取数组的最大索引值
        int[] arr = {99, 20, 30, 100, 51111, 60};
        int max = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[max] < arr[i]) {
                max = i;
            }
        }
        System.out.println("最大值是：" + arr[max] + "索引值是：" + max);
    }
}

